Optimal. Leaf size=30 \[ -\sin ^{-1}\left (\frac {\cos (x)}{\sqrt {2}}\right )-\frac {1}{2} \cos (x) \sqrt {2-\cos ^2(x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3265, 201, 222}
\begin {gather*} -\text {ArcSin}\left (\frac {\cos (x)}{\sqrt {2}}\right )-\frac {1}{2} \cos (x) \sqrt {2-\cos ^2(x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 201
Rule 222
Rule 3265
Rubi steps
\begin {align*} \int \sin (x) \sqrt {1+\sin ^2(x)} \, dx &=-\text {Subst}\left (\int \sqrt {2-x^2} \, dx,x,\cos (x)\right )\\ &=-\frac {1}{2} \cos (x) \sqrt {2-\cos ^2(x)}-\text {Subst}\left (\int \frac {1}{\sqrt {2-x^2}} \, dx,x,\cos (x)\right )\\ &=-\sin ^{-1}\left (\frac {\cos (x)}{\sqrt {2}}\right )-\frac {1}{2} \cos (x) \sqrt {2-\cos ^2(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.04, size = 53, normalized size = 1.77 \begin {gather*} -\frac {\cos (x) \sqrt {3-\cos (2 x)}}{2 \sqrt {2}}+i \log \left (i \sqrt {2} \cos (x)+\sqrt {3-\cos (2 x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 5.52, size = 51, normalized size = 1.70
method | result | size |
default | \(-\frac {\sqrt {\left (1+\sin ^{2}\left (x \right )\right ) \left (\cos ^{2}\left (x \right )\right )}\, \left (\sqrt {-\left (\cos ^{4}\left (x \right )\right )+2 \left (\cos ^{2}\left (x \right )\right )}+\arcsin \left (\cos ^{2}\left (x \right )-1\right )\right )}{2 \cos \left (x \right ) \sqrt {1+\sin ^{2}\left (x \right )}}\) | \(51\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.56, size = 25, normalized size = 0.83 \begin {gather*} -\frac {1}{2} \, \sqrt {-\cos \left (x\right )^{2} + 2} \cos \left (x\right ) - \arcsin \left (\frac {1}{2} \, \sqrt {2} \cos \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 71 vs.
\(2 (25) = 50\).
time = 0.41, size = 71, normalized size = 2.37 \begin {gather*} -\frac {1}{2} \, \sqrt {-\cos \left (x\right )^{2} + 2} \cos \left (x\right ) + \frac {1}{2} \, \arctan \left (-\frac {\cos \left (x\right ) \sin \left (x\right ) - {\left (\cos \left (x\right )^{3} - \cos \left (x\right )\right )} \sqrt {-\cos \left (x\right )^{2} + 2}}{\cos \left (x\right )^{4} - 3 \, \cos \left (x\right )^{2} + 1}\right ) - \frac {1}{2} \, \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\sin ^{2}{\left (x \right )} + 1} \sin {\left (x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 25, normalized size = 0.83 \begin {gather*} -\frac {1}{2} \, \sqrt {-\cos \left (x\right )^{2} + 2} \cos \left (x\right ) - \arcsin \left (\frac {1}{2} \, \sqrt {2} \cos \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \sin \left (x\right )\,\sqrt {{\sin \left (x\right )}^2+1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________